package model;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import pizza.admin.entity.Pizza;

/**
 * 
 * @author Radoslav Stoyanov
 *
 */
@XmlRootElement(name = "Pizza")
@XmlType(propOrder = {"id", "name", "description", "price"})
public class XmlPizza {
	private Integer id;
	private String name;
	private String description;
	private Double price;
	
	public XmlPizza(Integer id, String name,
			String description, Double price) {
		this.id = id;
		this.name = name;
		this.description = description;
		this.price = price;
	}

	public XmlPizza() {
		this.id = null;
		this.name = "";
		this.description = "";
		this.price = null;
	}

	public XmlPizza(Pizza pizza) {
		this.id = pizza.getId();
		this.name = pizza.getName();
		this.description = pizza.getDescription();
		this.price = pizza.getPrice();
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

}
